import os

from django.shortcuts import render

# Create your views here.
from django.urls import path

from apps.houses.views import index,AreaView,PublishHouseView,\
    HousesImageView,MyHouseListView,IndexHouseView,MyhouseDetailView

urlpatterns = [
    path('houses/',index),
    # 1.城区列表 GET
    path('api/v1.0/areas/',AreaView.as_view()),
    # 2.发布房源 POST
    # 6.房屋数据搜索 GET
    path('api/v1.0/houses',PublishHouseView.as_view()),
    # # 3.上传房源图片 POST
    path('api/v1.0/houses/<int:house_id>/images',HousesImageView.as_view()),
    # # 4.我的房屋列表 GET
    path('api/v1.0/user/houses',MyHouseListView.as_view()),
    # # 5.首页房屋推荐 GET
    path('api/v1.0/houses/index',IndexHouseView.as_view()),
    # # 7.房屋详情页面 GET
    path('api/v1.0/houses/<int:house_id>',MyhouseDetailView.as_view()),
]
